home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3285 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: ix.netcom.com!netnews
  2. From: johnma2@ix.netcom.com(John Ma )
  3. Newsgroups: comp.lang.c
  4. Subject: Pass password to "passwd" in C
  5. Date: 27 Jan 1996 15:58:09 GMT
  6. Organization: Netcom
  7. Message-ID: <4edi2h$p0k@ixnews7.ix.netcom.com>
  8. NNTP-Posting-Host: ix-wh6-18.ix.netcom.com
  9. X-NETCOM-Date: Sat Jan 27  7:58:09 AM PST 1996
  10.  
  11. Hi:
  12.  
  13.  
  14. I am writing a small utility program to change password on UNIX
  15. machine.  The command will look like:  set_password vendor1 (password
  16. for vendor will be set to guest password); or set_password vendor2
  17. (password for same vendor will be set to internal password).  The
  18. reason because we use the same login id/password as vendor due to file
  19. access reason, but we want to control their access, so that we want to
  20. change to their password only if we feel they need to dial in.
  21.  
  22. I am using C, and I will need to use "passwd" command, but passwd need
  23. pass 3 arguments on three prompt(old password, new password, retypr new
  24. password),  how can I do it in the program to respond to prompt
  25. automatically?   
  26.  
  27. Any information is help.
  28.  
  29. Thank you very much.
  30.  
  31. John
  32.  
  33.